Hệ thống quản lý phương tiện trong PHP

1 <?php
2     $connection= mysqli_connect(
"localhost","root","","vehiclemanagement");
3     session_start();
4     
5     $id= $_GET[
'id'];
6
7     $sql=
"SELECT * FROM `booking` WHERE booking_id='$id'";
8     
//echo $sql;
9     $res= mysqli_query($connection,$sql);
10     $row= mysqli_fetch_assoc($res);
11
12     $sql1=
"SELECT * FROM `vehicle` WHERE veh_available='0'";
13     
//echo $sql;
14     $res1= mysqli_query($connection,$sql1);
15
16     $sql2=
"SELECT * FROM `driver` WHERE dr_available='0'";
17     
//echo $sql;
18     $res2= mysqli_query($connection,$sql2);
19    
20 ?>
21
22
23 <!DOCTYPE html>
24 <html lang=
"en">
25 <head>
26     <meta charset=
"UTF-8">
27     <title>Confirm booking</title>
28     
29     <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
30     <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
31     <script src=
"https://code.jquery.com/jquery-2.2.0.min.js" type="text/javascript"></script>
32     
33     <link rel=
"stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
34     <link rel=
"stylesheet" href="style.css">
35 </head>
36 <body>
37   <?php include
'navbar_admin.php'; ?>
38   <br>
39    <div
class="container">
40        <div
class="row">
41           <div
class="col-md-3"></div>
42            <div
class="col-md-6">
43               <div
class="page-header">
44                 <h1 style=
"text-align:center;">Confirm Booking</h1>
45                  <?php
//echo $msg; ?>
46                 </div>
47                 
48                 
49                 
50                 <p><strong>Booking Id: </strong><?php echo $row[
'booking_id']; ?></p>
51                 
52                
53                 <p><strong>Customer Name: </strong><?php echo $row[
'name']; ?></p>
54                 
55                 
56                 <p><strong>Requested Date: </strong><?php echo $row[
'req_date']; ?></p>
57                 
58                 
59                 <p><strong>Requested Time: </strong><?php echo $row[
'req_time']; ?></p>
60                 
61                 
62                 <p><strong>Return Date: </strong><?php echo $row[
'ret_date']; ?></p>
63                 
64                 
65                 <p><strong>Return Time: </strong><?php echo $row[
'ret_time']; ?></p>
66                 
67                 
68                 <p><strong>Destination: </strong><?php echo $row[
'destination']; ?></p>
69                 
70                 
71                 <p><strong>PickUp Point: </strong><?php echo $row[
'pickup_point']; ?></p>
72                 
73                 
74                 <p><strong>Email: </strong><?php echo $row[
'email']; ?></p>
75                 
76                 
77                 <p><strong>Mobile: </strong><?php echo $row[
'mobile']; ?></p>
78                 
79                 
80                 
81                <form action=
"sendmail.php?id=<?php echo $id; ?>" method="post">
82        
83                     <div
class="input-group">
84                       <span
class="input-group-addon"><b>Available Cars</b></span>
85                         <
select class="form-control" name="veh_reg";>
86                            <?php
87                                
while($row1=mysqli_fetch_assoc($res1)) { ?>
88                             ?>
89                             <option><?php echo $row1[
'veh_reg'];?></option>
90                             <?php } ?>
91                         </
select>
92                     </div>
93                     <br>
94                     <div
class="input-group">
95                       <span
class="input-group-addon"><b>Available Drivers</b></span>
96                         <
select class="form-control" name="driverid">
97                            <?php
98                                
while($row2=mysqli_fetch_assoc($res2)) { ?>
99                             ?>
100                             <option><?php echo $row2[
'driverid']; ?></option>
101                             <?php } ?>
102                         </
select>
103                     </div>
104                    
105                     <br>
106                     <button
class="btn btn-success" type="submit" name="email">Confirm</button>
107                 </form>
108            </div>
109            <div
class="col-md-3"></div>
110        </div>
111    </div>
112     
113 </body>
114 </html>


Gõ tìm kiếm nhanh...